SRCS:=$(wildcard ./*.c)
OBJS:=$(patsubst ./%.c, ./%.o, $(SRCS))
CC:=gcc
OUTS:=main

$(OUTS):$(OBJS)
	$(CC) $^ -o $@ -lpthread

./%.o:./%.c
	$(CC) -c $^ -o $@

.PHONY:clean rebuild

clean:
	$(RM) $(OUTS) $(OBJS)

rebuild:clean $(OUTS)



